<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义指令钩子函数的参数</title>
</head>
<body>
<div id="app">
    <div v-demo:param.a.b="message"></div>
</div>

<script !src="" type="module">
    import {createApp, ref} from "../../../../js/vue.esm-browser.js";

    let app = createApp({
        setup() {
            let message = ref("Hello, World!")
            return {
                message
            }
        }
    })

    app.directive(
        "demo",
        {
            mounted(el, binding, vNode, preNode){
                let s = JSON.stringify

                el.innerHTML =
                    "value: " + s(binding.value) + "<br> " +
                    "argument:" + s(binding.arg) + "<br> " +
                    "modifiers:" + s(binding.modifiers) + "<br> " +
                    "instance:" + s(binding.instance) + "<br> " +
                    "dir:" + s(binding.dir) + "<br> "

            }
        }
    )


    app.mount("#app")
</script>
</body>
</html>